# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kig
pkgver=23.08.4
pkgrel=0
pkgdesc="Interactive Geometry"
url="https://edu.kde.org/kig"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	karchive5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdoctools5-dev
	ki18n5-dev
	kiconthemes5-dev
	kparts5-dev
	ktexteditor5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	qt5-qtsvg-dev
	samurai
	"
_repo_url="https://invent.kde.org/education/kig.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kig-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8d0c475b22cbb693bd3cd6754507270c69a5d7f9b2c2bb30ffa8d680ab092f4857f27e88df8897ad3d92cc99850bd34df966f92447180cf7304eb08b3bedfb71  kig-23.08.4.tar.xz
"
